//
//  decisionPoint.h
//  decision
//
//  Created by Zhiguo on 03.02.10.
//  Copyright 2010 Home. All rights reserved.
//


#import <sqlite3.h>

@interface decisionPoint : NSObject {

	sqlite3 *database;
	
	NSInteger pId;
	NSString *truncate;
	NSString *desc;
	BOOL variable;
	NSInteger weight;
	NSInteger decisionId;
}

@property (assign, nonatomic, readonly) NSInteger pId;
@property (nonatomic, retain) NSString *truncate;
@property (nonatomic, retain) NSString *desc;
@property  BOOL variable;
@property  NSInteger weight;
@property  NSInteger decisionId;

-(id)initWithPid:(NSInteger)pId database:(sqlite3 *)db;
-(id)initWithTandD:(NSString *)truncatePara desc:(NSString *)descPara;
-(NSInteger)insertNewDpIntoDatabase;
//+(NSInteger)insertNewDpIntoDatabase:(sqlite3 *)database newdptruncate:(NSString *)newdptruncate newdpdesc:(NSString *)newdpdesc;
-(void)deleteDpFromDatabase;
@end
